# l0=[x for x in range(1,100) if x%2==0]
# print(l0,type(l0))

# import random
# r=random.random()
# print(r)
# r=random.randint(5,9)
# print(r)
# # 47.计算二维列表中所有数字的平均数
# # [
# # [1,2,3],
# # [4,5,6],
# # [7,8,9]
# # ]
# l0=[
# [1,2,3],
# [4,5,6],
# [7,8,9]
# ]
# sum=0  #total
# count=0
# for i in range(len(l0)):
#     for j in range(len(l0[i])):
#         # print(l0[i][j])
#         sum+=l0[i][j]
#         count+=1
# print(sum,count,sum/count)
# # 48 编写一个程序，输入一个字符串，统计其中每个字符出现的次数
# str0=input("请输入一个字符串：")
# d0={}
# for i in str0:
#     if i not in d0:
#         d0[i]=1
#     elif i in d0:
#         d0[i]+=1
# print(d0)

# # 49 编写一个程序，输入一个列表和一个整数 n，
# # 将该列表中的所有元素都循环右移 n 位，并输出修改后的列表。
# l1=list(input("请输入一个列表："))
# n=int(input("请输入一个整数："))
# print(l1,n)
# # l1=['1','2','3','4','5']
# l2=[]
# # n=2
# for i in range(len(l1)):
#     l2.append(l1[(i+n)%len(l1)])
# print(l2)


# # 50.找出一个二维数组每行的最大值
# # [
# #     [1, 5, 9],
# #     [2, 3, 6],
# # [7, 5, 3]
# # ]
# # 输入 9 6 7
# l0=[
#     [1, 5, 9],
#     [2, 3, 6],
# [7, 5, 3]
# ]
# for i in range(len(l0)):
#     max_value=None
#     for j in range(len(l0[i])):
#         # print(l0[i][j])
#         if max_value is None:
#             max_value=l0[i][j]
#         else:
#             if max_value<l0[i][j]:
#                 max_value=l0[i][j]
#     print(max_value)
# # # for i in range(len(l0)):
# # #     # print(l0[i])
# # #     max=0
# # #     for j in range(len(l0[i])):
# # #         # print(l0[i][j])
# # #         if max<l0[i][j]:
# # #             max=l0[i][j]
# # #     print(max)
# #
# #
# #
# # for e in l0:
# #     print(max(e))

# # 51.找出一个二维数组每列的最大值
# # [
# #     [1, 5, 9],
# #     [2, 3, 6],
# #     [7, 5, 3]
# # ]
# # 输入 7 5 9
# l1=[
#     [1, 5, 9],
#     [2, 3, 6],
#     [7, 5, 3]
# ]
# for i in range(len(l1)):
#     max_value=None
#     for j in range(len(l1)):
#         # print(l1[j][i])
#         if max_value is None:
#             max_value=l1[j][i]
#         else:
#             if max_value<l1[j][i]:
#                 max_value=l1[j][i]
#     print(max_value)
# # def get_n(n):
# #     max=0
# #     for i in range(len(l1)):
# #         # print(l1[i])
# #         if max<l1[i][n-1]:
# #             max=l1[i][n-1]
# #     return max
# # for j in range(1,len(l1)+1):
# #     r=get_n(j)
# #     print(r)


# # # 52.对二维数组进行水平镜像
# # [
# # [1,2,3],
# # [4,5,6],
# # [7,8,9]
# # ]
# #
# # [
# # [3,2,1],
# # [6,5,4],
# # [9,8,7]
# # ]
# l0=[
# [1,2,3],
# [4,5,6],
# [7,8,9]
# ]
# for i in range(len(l0)):
#     print(l0[i])
#     for j in range(len(l0[i])//2):
#         print(l0[i][j],l0[i][len(l0[i])-1-j])
#         temp=l0[i][len(l0[i]) - 1 - j]
#         l0[i][len(l0[i]) - 1 - j]=l0[i][j]
#         l0[i][j]=temp
# print(l0)
# # l=[1,2,3,4,5,6,7,8,9]
# # for i in range(len(l)//2):
# #     print(l[i],l[len(l)-1-i])
# #     temp=l[i]
# #     l[i]=l[len(l)-1-i]
# #     l[len(l)-1-i]=temp
# # print(l)

# # 53.对二维数组进行竖直镜像
# # [
# # [1,2,3],
# # [4,5,6],
# # [7,8,9]
# # ]
# #
# # [
# # [7,8,9],
# # [4,5,6],
# # [1,2,3]
# # ]
# l0=[
# [1,2,3],
# [4,5,6],
# [7,8,9]
# ]
# for i in range(len(l0)):
#     # print(i,l0[i])
#     for j in range(len(l0[i])//2):
#         # print(j,l0[j][i],l0[len(l0)-1-j][i])
#         temp=l0[j][i]
#         l0[j][i]=l0[len(l0)-1-j][i]
#         l0[len(l0) - 1 - j][i]=temp
# print(l0)




# # 57.编写一个函数，接受一个整数参数 n，
# # 返回 n 的阶乘和。 5！+4！+3！+2！+1!s
# def get_sum(n):
#     total=0
#     for i in range(1,n+1):
#         total+=get_mul(i)  #调用get_mul(n) 赋予形参n  i
#     return total
# def get_mul(n):
#     mul=1
#     for i in range(1,n+1):
#         mul*=i
#     return mul
# print(get_mul(5))
# print(get_sum(5))









# 学习





# def get_n(s,m=2,n='嗝~'):
#     for i in range(m):
#         print(f"性别是{s}")
#         print(f'你习惯打{n}吗？')
#
# get_n(1)
# get_n(0,1,'呼~')
# get_n(1,m=1)
# get_n(0,n='咕~')



# print(max(1,2,3,5,6,7,8,9,784,8))


# def my_lijie(name,*args,age=23,**kwargs):
#     print(f'他的名字是:{name}')
#     print(f'他的爱好有：{args}')
#     print(f'他的年龄是:{age}')
#     print(f'他的：{kwargs}')
# my_lijie('张二狗','发呆','吃饭','看美人',习惯='睡觉',长相='一言难尽',age=25)

# c=123456
# def fun1(b):
#     global c
#     c=654321
#     a=87
#
#     print(b,a,c,sep='')
# fun1(9)
# print(c)


l0=[1,2,3,["我","是","神"]]
# l1=l0
# l0.append(8)
# print(l1)

# l1=l0.copy()
# l0.append(8)
# print(l1)
# l0[3].append("明")
# print(l1)

# import copy
# l1=copy.deepcopy(l0)
# l0.append(8)
# print(l1)